package main

import "fmt"

func main() {
	//多维数组

	var a [3][4]int //[[0 0 0 0] [0 0 0 0] [0 0 0 0]]
	fmt.Println(a)

	a = [3][4]int{{1}} //可以直接赋值
	fmt.Println(a)

	a = [3][4]int{1: {1}} //同样可以指定下标
	fmt.Println(a)        //[[0 0 0 0] [1 0 0 0] [0 0 0 0]]

	var b [2][3][2]int = [2][3][2]int{} //多维也一样
	fmt.Print(b)                        //[[[0 0] [0 0] [0 0]] [[0 0] [0 0] [0 0]]]

}
